<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/weuix.min.css">
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/header_common.css" />
		<link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/comment_New.css" />
		<link rel="stylesheet" type="text/css" href="{:ADDON_PUBLIC_PATH}/css/guanggao.css"/>
		 <script src="{:ADDON_PUBLIC_PATH}/js/guanggao.js"></script>
		<script src="{:ADDON_PUBLIC_PATH}/js/zepto.min.js"></script>
		<script src="{:ADDON_PUBLIC_PATH}/js/common.js"></script>
		<script type="text/javascript">
		//静态变量
		var SITE_URL = "{:SITE_URL}";
		var IMG_PATH = "__IMG__";
		var STATIC_PATH = "__STATIC__";
		var WX_APPID = "{$jsapiParams.appId}";
		var	WXJS_TIMESTAMP='{$jsapiParams.timestamp}'; 
		var NONCESTR= '{$jsapiParams.nonceStr}'; 
		var SIGNATURE= '{$jsapiParams.signature}';
		
	</script>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="minify.php?f=__JS__/prefixfree.min.js,__JS__/m/dialog.js,__JS__/m/flipsnap.min.js,__JS__/m/mobile_module.js&v={:SITE_VERSION}"></script>
	</head>

	<body>
		<!--导航栏-->
		<div class="weui_btn_default weui-header">
			<div class="weui-header-left">
				<a href="javascript: window.history.go(-1);" class="icon icon-109 f-blue"></a>
			</div>
			<h1 class="weui-header-title f-black">评论</h1>
		</div>
		<!--评论输入框-->
		<div class="weui_cells_title">评论</div>
		<form action="" method="post" >
			<div class="weui_cells moments comment_interval">
			<!-- 普通的post -->
			<div class="weui_cell moments__post">
				<div class="weui_cell_hd">
					<img class="circle" src="{$data['headimgurl']}">
				</div>
				<div class="weui_cell_bd">
					<!-- 人名链接 -->
					<a class="title" href="javascript:;">
						<span>{$data['nickname']}</span>
					</a>
				</div>
				<div class="weui_cells weui_cells_form">
					<div class="weui_cell">
						<div class="weui_cell_bd weui_cell_primary">
							<textarea id="textarea" class="weui_textarea" placeholder="写下你独特的见解吧" rows="3" name="content"></textarea>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="page-bd-15">
			<input type="submit"  class="weui_btn weui_btn_primary ajax-post">
		</div>
		</form>
		<div class="page-bd-15">
<div class="weui_cells_title">留言回复</div>
 <ul class="weui-comment">
	<volist name="redata" id="val">
		 <li class="weui-comment-item"> 
		 <div class="weui-comment-li">  </div> <div class="userinfo"> <strong class="nickname">{$data['nickname']}</strong> <img class="avatar" src="{$data['headimgurl']}"> </div> <div class="weui-comment-msg"> <span class="status"></span> {$val['content']}</div> <p class="time">{:date('Y-m-d H:i',$val['create_time'])}</p> 
		 
		 <div class="weui-comment-reply"> <div class="nickname">管理员回复</div> <div class="weui-comment-msg"> <if condition="$val['reply_content']">{$val['reply_content']}<else/>等待管理员回复</if> </div> <p class="time"><if condition="$val['review_time']">{:date('Y-m-d H:i',$val['review_time'])}</if> </p> </div>
		  </li>
	</volist>
  </ul>
  
</div>
<div class="weui-footer" style="margin-top: 60px;">
		  <p class="weui-footer__links">
		    <a href="http://h.eqxiu.com/s/04twlh4V" class="weui-footer__link">微生活工作室</a>
		  </p>
		  <a  href="{:U('term_text_cn')}" class="weui-footer__text" style="border-radius: ;">Copyright © 20016-2017</a>
		</div>
	<script>
    $.WeiPHP.initWxShare({
	    title:"最美档案照——美颜瘦脸",
	    imgUrl:"http://wei.gzpyp.edu.cn/Uploads/Picture/2017-09-02/59aa05c299277.png",
	    desc:"16,17级可支持在线查看,在线打印,修改背景色+美白美颜+冲印裁剪",
	    link: "{:U('index')}",
	})
          $(document).on('click', '.ajax-post', function() {
          	$.showLoading();
		    var data = $('form').serialize();
		    var url = $('form').attr('action');
		   	$.ajax({
			    url:url,
			    type:"post",
			    dataType:"json",
			    data:data,
			    success:function(data){
			     	$.hideLoading();
		            console.log(data);
		            if (data.status == 1) {
		                 $.toast(data.info); 
		                 setTimeout(function(){
		                 	//  history.pushState("","","{:U('booksDetail',array('bid'=>I('get.bid')))}");  
		                 	location.reload();
		                 	// window.history.go(-1);
		                 },1500);
		            } else {
		                 $.toast(data.info, "forbidden");
		            }
			    },
			    error:function(){
			      	$.toast("错误", "forbidden");
			    }
			});
		    return false;
		})
	</script>
	</body>

</html>